﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.ServiceModel;
using System.Text;

namespace Intel.Server.WCFLibrary
{
    // 注意: 使用“重构”菜单上的“重命名”命令，可以同时更改代码和配置文件中的接口名“IService1”。
    [ServiceContract]
    public interface IPCHMSService
    {
        [OperationContract]
        UserInfo GetInfo(string SessionId);

        [OperationContract]
        string RequestSession(string Username, string Password);

        [OperationContract]
        DateTime? RequestUploadRecords(string SessionId,DataType type);

        [OperationContract]
        bool Validate(string Username, string Password);

        [OperationContract]
        void Upload(FileData Data);

    }


    [MessageContract]
    public class FileData
    {
        [MessageHeader]
        public DataType type;

        [MessageHeader]
        public string SessionId;


        [MessageBodyMember]
        public System.IO.Stream Data;

    }
    [DataContract]
    public class UserInfo
    {
        [DataMember]
        public string Email;

        [DataMember]
        public string Name;
    }
}